import { service } from './request.js'

export default {
  //查询list
  fetchList(data) {
    return service({
      url: `lyitech/hire/consumptionplan/list`,
      method: 'get',
      data,
    })
  },
  //新增
  save(data) {
    return service({
      url: `lyitech/hire/consumptionplan/save`,
      method: 'post',
      data,
    })
  },
  //查看
  check(id) {
    return service({
      url: `lyitech/hire/consumptionplan/info/${id}`,
      method: 'get',
    })
  },

  //编辑
  update(data) {
    return service({
      url: `lyitech/hire/consumptionplan/update`,
      method: 'post',
      data,
    })
  },
  //删除
  delete(data) {
    return service({
      url: `lyitech/hire/consumptionplan/delete`,
      method: 'post',
      data,
    })
  },
  //获取编辑时段list
  checkContent(id) {
    return service({
      url: `lyitech/hire/consumptioncontent/info/${id}`,
      method: 'get',
    })
  },
  //新增消费时段详情
  saveContent(data) {
    return service({
      url: `lyitech/hire/consumptioncontent/save`,
      method: 'post',
      data,
    })
  },
  //更新消费时段详情
  updateContent(data) {
    return service({
      url: `lyitech/hire/consumptioncontent/update`,
      method: 'post',
      data,
    })
  },
}
